package com.gjsrmyy.edi.quartz;

import com.gjsrmyy.edi.service.ClientService;
import com.gjsrmyy.edi.service.ClientServiceImpl;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

public class EveryDayJob implements Job {
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        ClientService service = new ClientServiceImpl();
        try {
            // 入库
            service.uploadRegistrationOfDrugs();
            service.uploadRegistrationOfConsumables();

            // 供应商
            service.uploadSupplierDirOfDrugs();
            service.uploadSupplierDirOfConsumables();

            // 人员
            service.uploadStaffDirOfDrugs();
            service.uploadStaffDirOfConsumables();

            // 部门
            service.uploadDepartmentOfDrugs();
            service.uploadDepartmentOfConsumables();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
